package com.otod.commons.tools;

import java.util.Enumeration;
import java.util.Properties;
import java.util.ResourceBundle;

public class PropertyMgr {
	public static final String PROPERTY_LIST_SIZE_KEY = "size";
	  public static final String PROPERTY_NAME_KEY = "name";
	  public static final String PROPERTY_VALUE_KEY = "value";

	  public static synchronized Properties init(String sPropFile)
	  {
	    Properties props = new Properties();
	    ResourceBundle bundle = ResourceBundle.getBundle(sPropFile);
	    Enumeration<String> enums = bundle.getKeys();
	    Object key = null;
	    Object value = null;
	    while (enums.hasMoreElements()) {
	      key = enums.nextElement();
	      value = bundle.getString(key.toString());
	      props.put(key, value);
	    }
	    bundle = null;
	    return props;
	  }

}
